package com.flnet.foxwash.service.impl;

import java.util.List;

import com.flnet.foxwash.domain.WShopPrice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flnet.foxwash.mapper.WVendorMapper;
import com.flnet.foxwash.domain.WVendor;
import com.flnet.foxwash.service.IWVendorService;
import com.flnet.common.support.Convert;

/**
 * 供应商 服务层实现
 * 
 * @author flnet
 * @date 2019-03-20
 */
@Service
public class WVendorServiceImpl implements IWVendorService 
{
	@Autowired
	private WVendorMapper wVendorMapper;

	/**
     * 查询供应商信息
     * 
     * @param vendorId 供应商ID
     * @return 供应商信息
     */
    @Override
	public WVendor selectWVendorById(Long vendorId)
	{
	    return wVendorMapper.selectWVendorById(vendorId);
	}
	
	/**
     * 查询供应商列表
     * 
     * @param wVendor 供应商信息
     * @return 供应商集合
     */
	@Override
	public List<WVendor> selectWVendorList(WVendor wVendor)
	{
	    return wVendorMapper.selectWVendorList(wVendor);
	}
	
    /**
     * 新增供应商
     * 
     * @param wVendor 供应商信息
     * @return 结果
     */
	@Override
	public int insertWVendor(WVendor wVendor)
	{
	    return wVendorMapper.insertWVendor(wVendor);
	}
	
	/**
     * 修改供应商
     * 
     * @param wVendor 供应商信息
     * @return 结果
     */
	@Override
	public int updateWVendor(WVendor wVendor)
	{
	    return wVendorMapper.updateWVendor(wVendor);
	}

	/**
     * 删除供应商对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteWVendorByIds(String ids)
	{
		return wVendorMapper.deleteWVendorByIds(Convert.toStrArray(ids));
	}

	/**
	 * 更新供应商对象状态
	 *
	 * @param wVendor 需要更新状态的供应商
	 * @return 结果
	 */
	@Override
	public int changeStatus(WVendor wVendor) {
		return wVendorMapper.updateWVendor(wVendor);
	}
	
}
